[Tested for Ubuntu 18.04]
First I would like to secure my server against Bruteforce attacks, at least for ssh.
mkdir ~/.ssh
chmod 0700 ~/.ssh
touch ~/.ssh/authorized_keys
chmod 0600 ~/.ssh/authorized_keys
echo "ssh-rsa AAAA[...]mmMveIJc= SomeCommentForTheKey" >> ~/.ssh/authorized_keys
nano /etc/ssh/sshd_config
RSAAuthentication yes
PubkeyAuthentication yes
nano /etc/ssh/sshd_config
ChallengeResponseAuthentication no
PasswordAuthentication no
UsePAM no
service ssh restart
nano /etc/ssh/sshd_config
Port 11111 # or any other port not used by your server